<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <!-- Latest compiled and minified CSS & JS -->
    <link rel="stylesheet" media="screen" href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css">
    <script src="//netdna.bootstrapcdn.com/bootstrap/3.1.0/js/bootstrap.min.js"></script>
    <script src="https://cdn.bootcss.com/vue/2.5.16/vue.js"></script>
</head>
<body>
<div id="hd">
    <div :is="type"></div>
    <input type="radio" v-model="type" value="hdInput">文本框
    <input type="radio" v-model="type" value="hdText">文本域
</div>
<script>
    var hdInput={
        template:'<input type="text">'
    }
    var hdText={
        template:'<textarea></textarea>'
    }
    var app=new Vue({
        el:'#hd',
        components:{
            hdInput:hdInput,
            hdText:hdText
        },
        data:{
            type:'hdInput'
        }
    })
</script>
</body>
</html>